package com.example.huawei.system.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @TableName community_release
 */
@ApiModel("社区帖子实体类")
@TableName(value = "community_release")
@Data
public class CommunityRelease implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @ApiModelProperty(value = "主键")
    @TableId
    private String id;

    /**
     * 标题
     */
    @ApiModelProperty(value = "标题")
    private String title;

    /**
     * 内容
     */
    @ApiModelProperty(value = "内容")
    private String content;

    /**
     * 图片
     */
    @ApiModelProperty(value = "图片")
    private String imageUrls;

    /**
     * 发帖人id
     */
    @ApiModelProperty(value = "发帖人id")
    private String userId;

    /**
     * 类型: 问答/广场
     */
    @ApiModelProperty(value = "类型: 问答/广场")
    private String moduleType;

    /**
     * 二级类型: 热榜/推荐/精选/摩托车/越野
     */
    @ApiModelProperty(value = "二级类型: 热榜/推荐/精选/摩托车/越野")
    private String childType;

    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;


    /**
     * 评论数量
     */
    @ApiModelProperty(value = "评论数量")
    @TableField(exist = false)
    private Integer commentCount;

    /**
     * 点赞数量
     */
    @ApiModelProperty(value = "点赞数量")
    @TableField(exist = false)
    private Integer likeCount;

    /**
     * 加入平台时长(天)
     */
    @ApiModelProperty(value = "加入平台时长(天)")
    @TableField(exist = false)
    private String joinTime;

    /**
     * 头像
     */
    @ApiModelProperty(value = "头像")
    @TableField(exist = false)
    private String avatar;

    /**
     * 昵称
     */
    @ApiModelProperty(value = "昵称")
    @TableField(exist = false)
    private String username;


    /**
     * 当前用户是否点赞
     */
    @ApiModelProperty(value = "当前用户是否点赞")
    @TableField(exist = false)
    private Boolean likeFlag;

}
